home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / database / powerbase / docs / Customise < prev    next >
Encoding:
Text File  |  1997-03-06  |  20.9 KB  |  417 lines

  1.                     CH 14 - CUSTOMISING POWERBASE
  2.                     =============================
  3. This chapter describes all the things you can do to influence the way
  4. Powerbase looks and functions.
  5.  
  6. 14.1  Overall control of the database
  7. =====================================
  8. A Powerbase database is normally controlled in four ways:−
  9.  
  10. •  mouse-clicks on the keypad
  11. •  keystrokes which mimic the actions of the keypad
  12. •  choices from the main menu
  13. •  choices from the icon-bar menu
  14.  
  15. Each of these can be disabled by deselecting one of the option switches on
  16. the Password window (see 11.2).  The main reason why you might want to do
  17. this is to provide limited facilities to someone else who is using your
  18. database.  It doesn’t, on the face of it, make a lot of sense to disable
  19. both the keypad and the keystroke-equivalents as no browsing or editing
  20. would then be possible.  You can, however, place some or all of the keypad
  21. buttons on the record screen itself (see 4.2.9) thus allowing you to choose
  22. what functions you want to allow access to.  You might, for example, wish to
  23. provide only the “Next record”, “Previous record” and “Search” buttons. 
  24. Define these as Button fields at the time the record is being designed then
  25. disable the keypad and keystroke equivalents.
  26.  
  27. Other switches in the Password window enable you to stop the user exporting
  28. data as CSV files or subsets or printing reports.
  29.  
  30. 14.2  Defining the function keys
  31. ================================
  32. Any button on the keypad may have its action duplicated by one of the keys
  33. F1-F11, with or without the use of Shift or Ctrl.
  34.  
  35. Point at the button to which you wish to assign a key and click MENU to
  36. display the keypad menu. Assign leads to a window which shows the present
  37. key-assignment, if any. Use the “bump” icons to select the required function
  38. key and, if desired, select one of the switches for Shift and Ctrl. Click on
  39. the Assign button and you will now find that the assigned key exactly mimics
  40. the keypad button − even to the extent of actually “pressing” the button
  41. when you type the key.
  42.  
  43. One important constraint should be noted. Whatever key you assign to the
  44. Search button, Powerbase will automatically assign the shifted version of
  45. this key to the “search all subfiles” function (see 2.3.1). For this reason
  46. you should assign an unshifted key to Search and avoid assigning the shifted
  47. version to any other keypad button. Similarly, assigning a key to the New
  48. record button automatically assigns the shifted key to the Copy record
  49. function.
  50.  
  51. You may save your key definitions by choosing Save choices from the keypad
  52. menu and you will find them operative next time you use Powerbase. Please
  53. note that your definitions work with all the databases you use; there is no
  54. facility for saving separate assignments for each database. The default
  55. keystrokes (together with some which duplicate non-keypad actions) are
  56. listed in Appendix B.  If they have been redefined you may restore the
  57. defaults by choosing Defaults from the keypad menu. If you wish to “lose”
  58. the redefined keystrokes permanently you should restore the defaults as
  59. described then Save choices.
  60.  
  61. List keys on the keypad menu displays all the key definitions (including
  62. those for non-keypad functions) in a window from which the information may
  63. be saved as a text file.
  64.  
  65. Function keys may also be used to enter data into record fields or writable
  66. icons in dialogue boxes.  The actual programming of the keys is done at the
  67. command line which is accessed by pressing f12. This takes you temporarily
  68. out of the desktop and gives you a “star” prompt at the bootm of the screen. 
  69. Suppose you want to program f3 to enter the word “Powerbase”.  Type, at the
  70. star prompt:
  71.                 Key3 Powerbase
  72.  
  73. and press Return twice to return to the desktop.  The string assigned to the
  74. key may be entered by typing Ctrl-Shift-f3.  Any of the keys f1-f9 may be
  75. programmed and the string is always entered by typing the key with Ctrl and
  76. Shift both held down.
  77.  
  78. 14.3  Print options
  79. ===================
  80. The Print options window, accessible from the Print submenu or by typing
  81. Shift Print, was described in some detail in 3.5 but a few features still
  82. require comment.  You may set up this window to suit the requirements for a
  83. particular database and then save the set-up as part of the database by
  84. clicking on Save choices with the in database radio button selected. 
  85.  
  86. A Save box appears which, by default, saves the options file in the PrintRes
  87. directory under the name PrtOptions. A file of that name, in that directory,
  88. is read when the database is subsequently re-opened and will set up the
  89. print options as you left them. You can, of course, give the file a
  90. different name and even save it in a different place if you wish.  Print
  91. option files are recognisable by their icon, which bears a large “P”.  Some
  92. users like to have several of them in their database’s PrintRes directory to
  93. do different jobs. It is always possible to load the one you want by opening
  94. the PrintRes directory (Show resources from Print submenu or, alternatively,
  95. Ctrl R) and double-clicking on  the required file or dragging it onto the
  96. record window. 
  97.  
  98. Should you wish to “throw out” your special keys set-up during a working
  99. session with the database you can restore the default settings by clicking
  100. Load default. If you like your own setup better than the default and wish to
  101. use it for all your databases then select the as default radio button before
  102. clicking Save choices.  The file PrtOptions will then be saved inside
  103. Powerbase itself. Note also that, provided the Print options window has not
  104. been closed, the Cancel button will restore it to the state it was in when
  105. you opened it.
  106.  
  107. 14.4  CSV options
  108. =================
  109. It was explained in 8.2 how to access the CSV options window and what the
  110. pop-up menus and option switches are for.  The buttons Save choices, as
  111. default, in database, Load default and Cancel work in a similar way to that
  112. described above for the Print options window − with one notable difference.
  113. No Save box appears when you Save choices in database; the file is saved as
  114. a plain text file called CSVoptions. This more limited behaviour has been
  115. chosen because, although you might want several Print options files for
  116. different jobs, it is unlikely that you will have a use for several CSV
  117. options files.
  118.  
  119. 14.5  Preferences
  120. =================
  121. Several previous references have been made to the Preferences window which
  122. is opened from the icon-bar menu. A full description of the choices offered
  123. in this window follows.
  124.  
  125. 14.5.1 Separators in date and time fields
  126. -----------------------------------------
  127. By default dates have the format dd-mm-yy or dd-mm-yyyy, i.e. the separator
  128. is a hyphen. You might wish to use a colon, full-stop, slash or other
  129. character. You may type any non-numeric character when entering dates and
  130. Powerbase will re-format the field to use the specified character.  Only
  131. fields actually defined to be of type Date behave in this way.
  132.  
  133. Fields defined to be of type Time have the form hh:mm:ss, i.e a colon is
  134. used as the separator. As in the case of dates, you may type any non-numeral
  135. you like during data entry and Powerbase will reformat the time as above. 
  136.  
  137. To change either of these separators type the required character into the
  138. writable icon in place of the default.
  139.  
  140. 14.5.2 Wild-cards
  141. -----------------
  142. The use of wild-card characters is described in 2.7.5 and 3.3.4.  By default
  143. “#” represents a single character and “$” a group of characters which need
  144. not be matched.  You may change either or both wild-card characters if you
  145. wish in the same way as described above for date and time separators.
  146.  
  147. 14.5.3 Option switches
  148. ----------------------
  149. Record edits as CSV file when ON causes a CSV file called NewData to be
  150. created in PrintJobs. New and edited records are saved in this file which
  151. may then be used to enter data into another Powerbase database.
  152.  
  153. Launch new copy 
  154. ···············
  155. When ON, causes another copy of Powerbase to be loaded when you double-click
  156. on a database, instead of closing the current database. This can be useful
  157. if you want to access several databases at once, as one copy Powerbase only
  158. supports the use of a single database. If there is a dormant copy of
  159. Powerbase on the icon-bar (i.e. one with “No data” under its icon) then
  160. double-clicking a database sends it to that copy rather than launching a new
  161. one. With the switch OFF double-clicking on a database closes down an
  162. already-open database before opening the new one. Even then you can load
  163. multiple copies of Powerbase by double-clicking on Powerbase itself and then
  164. open a different database in each by dragging the databases to the icons. 
  165.  
  166. Recalculate on opening
  167. ······················
  168. Affects Composite fields (see 6.2) whose associated formulae make use of the
  169. system variable TIME$. With the switch OFF the contents of such fields are
  170. recalculated only when a record is displayed. This might not be good enough
  171. where, for example, TIME$ is used in a User function (see 6.3) to keep track
  172. of people’s current ages. Selecting the switch causes Powerbase to scan the
  173. whole file and update such fields when the database is first opened.
  174.  
  175. Blank record on deletion  
  176. ························
  177. If this switch is OFF then deleting a record from the database merely
  178. removes all references to its key(s) from the index(es), leaving the actual
  179. record data untouched in the Database file. Although such “deleted” records
  180. will be overwritten when new records are entered, the situation may be
  181. deemed unsatisfactory from a security point of view since the “deleted”
  182. records can be examined by simply loading Database into Edit. If the switch
  183. is ON deletion causes the relevant record to be over-written with a blank
  184. record.
  185.  
  186. Keep descriptor with data 
  187. ·························
  188. Alters the behaviour of fields as they are dragged around the screen when
  189. designing the record layout.  With the switch OFF you may drag the data
  190. field and the descriptor independently of one another. With the switch ON
  191. this is true only of the descriptor; if you drag the data field the
  192. descriptor jumps to its “normal” position to the left of the data field as
  193. soon as you release the mouse button. 
  194.  
  195. Validate input 
  196. ··············
  197. Turns data validation (see Ch 5) ON and OFF.  If you ever find yourself
  198. unable to escape from a field linked to a validation table you can bring up
  199. the Preferences window, deselect this switch and try again.
  200.  
  201. Display linked table data  
  202. ·························
  203. Every time the caret enters a field with a link to a validation table a
  204. window showing data from the relevant validation table row appears to the
  205. right of the field if the switch is ON. This is either useful or
  206. infuriating, depending on your point of view. If turned OFF you can still
  207. call up the window for a specific field by double-clicking on the field with
  208. SELECT (see 5.5).
  209.  
  210. Warn of external deletion  
  211. ·························
  212. Since deleting data from an External field (see 2.6) involves the deletion
  213. of an actual file you will probably appreciate being warned when you are
  214. about to do it. With this switch ON you will be given a warning and the
  215. opportunity to change your mind.
  216.  
  217. Warn of duplicates  
  218. ··················
  219. The creation of records with identical primary keys can be prohibited if so
  220. desired (see 11.2.1). Normally, however, they are permitted. You may, if you
  221. wish, turn this switch ON to issue a warning that such a record is about to
  222. be created.
  223.  
  224. Default action on Return  
  225. ························
  226. According to the Acorn Style Guide for RISC OS typing Return anywhere inside
  227. a dialogue box ought to have the same effect as clicking on the default
  228. action button (that’s the one with the yellow channel border) regardless of
  229. which writable icon the caret is in. If that’s what you want then turn this
  230. switch ON. Many users (including the author!) hate it and prefer the default
  231. action to take place only if the caret is in the last writable icon when
  232. Return is typed. Hence the default setting, which is OFF.
  233.  
  234. Strip leading spaces 
  235. ····················
  236. Is ON by default.  Spaces at the beginning of data fields will be stripped
  237. before the record is written to the file.  Turn the switch OFF if you
  238. actually want spaces in this position
  239.  
  240. Strip trailing spaces 
  241. ·····················
  242. Should normally be left ON to avoid unwanted spaces at the right of data
  243. fields. It is easy to press the space-bar by accident when entering data
  244. quickly and you might not notice that a field has one or more spaces between
  245. the end of the last word and the caret. 
  246.  
  247. Balance every <n> records  
  248. ·························
  249. The need to balance indices and the use of this option is explained in 10.6.
  250.  
  251. Remember place in subfile  
  252. ·························
  253. With this switch OFF a change of subfile leads to the display of the first
  254. record in the new subfile. If you are doing a lot of hopping back and forth
  255. between subfiles to inspect specific records you might want to select the
  256. switch. It is then just as if you had bookmarks in separate chapters of a
  257. book; when you return to a subfile you have previously visited you will see
  258. the same record you were viewing when you left that subfile.
  259.  
  260. 14.5.4 Save indices (Default: Manual)
  261. -------------------------------------
  262. Indices are always saved whenever you close a database or quit Powerbase and
  263. only fear of power cuts or system failure (which includes some kind person
  264. switching off your computer!) need make you concerned about saving them
  265. yourself. With the Manual setting nothing happens during normal working
  266. unless you click Force update on the keypad.  Selecting Automatic or Warn
  267. only allows you to type in a suitable time interval (default = 10 min) at
  268. which Powerbase will either issue a warning to save your indices (using
  269. Force update) or actually save them for you.
  270.  
  271. 14.5.5 Start editing at
  272. -----------------------
  273. When a record is displayed the caret is placed, by default, in the first
  274. editable field.  Editing may be made to start at a different field by
  275. choosing Start editing from the Field submenu (see 2.5.4) or, alternatively,
  276. by placing the caret in the required field and typing Ctrl-S.  The tag of
  277. the relevant field is stored in this writable icon in the Preferences window
  278. and can be saved along with the other preferences.
  279.  
  280. 14.5.6 Application for ImpulseII data-merging
  281. ---------------------------------------------
  282. As noted elsewhere (9.2) Powerbase can merge directly into a
  283. suitably-formatted Impression document by simply dropping the document icon
  284. onto the record window. The dialogue box which then appears contains a
  285. writable icon which shows the application with which Powerbase will merge.
  286. This name  is, by default, “Impression”, but may be altered by users for
  287. their own purposes. An application which will receive data from Powerbase in
  288. this way must make use of the ImpulseII protocols as defined by Computer
  289. Concepts. Even if you are using Style or Publisher the name to which these
  290. applications respond is still “Impression”. 
  291.  
  292. 14.5.7 Save choices
  293. -------------------
  294. This section of the window works exactly as it does for CSV options (see
  295. 14.4) as do the Load default and Cancel buttons.
  296.  
  297. 14.6  Colours of key fields and linked fields
  298. =============================================
  299. These may be selected in a window reached by choosing Colours from the
  300. Miscellaneous submenu. The following default colours are used:− 
  301.  
  302.     Type                                             Foreground     Background
  303.  
  304.     Descriptor of key field (inactive)               dark blue      light grey
  305.     Descriptor of key field (active)                 red            light grey
  306.     Data icon of primary key field(s)                black          pale yellow
  307.     Data icon of field linked to validation table    dark green     white
  308.  
  309. Clicking with SELECT on the descriptor and data icons within this window
  310. makes either the foreground or background (depending on the setting of the
  311. two radio buttons) cycle through the available colours. Clicking with ADJUST
  312. cycles through the colours in the opposite direction. 
  313.  
  314. Apply allows you to see the effect of the changes and Defaults enables you
  315. to return the colours to what they were before, provided you haven’t clicked
  316. on Save choices. The latter applies the new colours and saves the changes so
  317. that they are effective next time the database is used. Different databases
  318. may have different colours.
  319.  
  320. 14.7  The Config file
  321. =====================
  322. Inside the Powerbase application directory is a sub-directory called
  323. Resources. The file Config, which will be found there, determines certain
  324. aspects of the program’s operation which will seldom need changing. Changes
  325. made to Config take effect only when Powerbase is next loaded. If you load
  326. the file into Edit you will see lines which determine:−
  327.  
  328. •       maximum number of fields per record (default = 100, maximum = 127)
  329.  
  330. •       maximum number of subsidiary indices (default = 10)
  331.  
  332. •       maximum number of validation tables (default = 10)
  333.  
  334. •       maximum number of pop-up menu fields (default = 3)
  335.  
  336. •       maximum number of columns in a validation table (default = 20)
  337.  
  338. •       whether submenus off the icon-bar menu open on the left instead of
  339.         on the right as normal.  This avoids the overlapping submenus which
  340.         can occur but many users hate it!  Put YES, instead of NO, at the
  341.         start of the line if you want the icon-bar menu to work like that.
  342.  
  343. •       background colour of record window.  Default (1) is pale grey.
  344.  
  345. •       whether password entry is forced to uppercase.  Earlier versions of
  346.         Powerbase allowed only uppercase letters in passwords and some users
  347.         may wish to place YES at the start of this line.  Current versions
  348.         of Powerbase allow both upper and lowercase letters.
  349.  
  350. •       display option for directories opened by buttons on the record
  351.         window. Default is -si (small icons). This may be changed to -li or
  352.         -fi (large icons and full information respectively). The options to
  353.         sort by name, type, date and size (-sn, -st, -sd, -ss) may also be
  354.         added after a space.
  355.  
  356. •       method used for storing Text, Sprite and Draw files which are linked
  357.         to External fields.  A description of the old and new methods is
  358.         given below.
  359.  
  360. When altering Config be sure to leave a space between the number or word
  361. which begins the line and the explanation.
  362.  
  363. 14.7.1 Pathnames for External file objects
  364. ------------------------------------------
  365. The system used is detemined by pacing the word OLD or NEW at the beginning
  366. of the relevant line in Config.  
  367.  
  368. The OLD method of deriving the pathname for the stored file object  is as
  369. follows:−
  370.  
  371. (a) Divide the record number by 4900. The integer part of the result is
  372.     used as the name of the top-level directory.
  373.  
  374. (b) Divide the record number by 70. The integer part of the result is used
  375.     as the name of the second-level directory.
  376.  
  377. (c) The integer remainder of dividing the record number by 70 is used as the
  378.     actual filename.
  379.  
  380. This is an awkward system if you are in the habit of using the filer windows
  381. to sift through the files rather than relying on Powerbase to display them.
  382. To calculate the number of the record to which the file belongs you have to
  383. take the number forming the name of the file’s parent directory, multiply by
  384. 70 and add the number corresponding to the filename itself.
  385.  
  386. The new system improves on this. Steps (a) and (b) are identical. The
  387. filename itself, however, uses the whole record number preceded by Rec, e.g.
  388. a file associated with record 275 will be called Rec275. You can therefore
  389. use the RISC OS filer’s Find command to locate and examine the file. Under
  390. the OLD system such a file would be called 65.
  391.  
  392. The default setting in Config is NEW.  Users should be aware that the
  393. earliest version of Powerbase to support this feature is v. 6.94, dated
  394. 02-03-96.  This and later versions understand both methods of storage and
  395. will rename files according to the Config setting. Thus, a database created
  396. under an earlier version in which record 275 is represented by a file called
  397. 65 will have that file renamed to Rec275 simply by displaying the record,
  398. even if the file itself is not loaded.  Once this has happened the file
  399. cannot be found by an earlier version of Powerbase.  Under most
  400. circumstances this should not cause any difficulty; just make sure you are
  401. using v. 6.94 or later.  Should you wish to run a database under an earlier
  402. version and access the External file objects from the record window you must
  403. first convert the filenames to the OLD format.  To do so place OLD in the
  404. Config file as described above, then load Powerbase. Open your database and
  405. click on the Play button.  Click on Stop when all records have been
  406. displayed. If you use more than one subfile you will need to do this for
  407. each occupied subfile.  OLD may be converted to NEW pathnames in a similar
  408. way.
  409.  
  410. 14.8  The Messages file
  411. =======================
  412. This text file in the Resources sub-directory contains all the error and
  413. warning messages used by Powerbase including those for Acorn’s interactive
  414. Help application. The wording may be altered if you wish.  Many error
  415. messages contain the string “%0” and possibly “%1” and “%2”.  Data items are
  416. substituted for these when the message is printed so don’t omit them or
  417. alter their logical placement within the message.